Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Use an old serial VT100 terminal with OS X System
Old VT-100 serial (RS232) terms can often be found for free in the computer trashes of various institutions like universities. I use mine as a terminal in a room away from my main computer location, but it could also be useful as a cheap second monitor dedicated to command-line work, to display logs or man pages, or as a jukebox interface in parties to avoid exposing your computer to spilled beer or other liquids (just run the lynx text web browser and some form of web remote control for iTunes). It costs almost nothing and is cool, maybe even useful!

Hardware: apart from the terminal itself, you need the appropriate type of serial cables (depends on hardware you have), a serial port, and a null modem. The old beige G3 is the only OSX supported computer that have the appropriate built-in serial ports. If you're not the lucky owner of such a machine, you can use a USB - RS232 interface (I do have a beige G3, so I do not have tested this with USB, but it should work as well).

Basically, you simply connect the serial connector of the old terminal to the null modem (whose function is to swap transmit and receive lines), then the null modem to the serial connector of your computer.

Configuration: from the command line, backup the original ttys file by typing sudo cp /etc/ttys /etc/ttys.orig. Edit /etc/ttys with your favorite text editor as administrator to enable login from the serial line -- change the line:

tty.serial   "/usr/libexec/getty serial.9600"    vt100   off secure
to the line:
tty.printer  "/usr/libexec/getty serial.9600"    vt100   on secure
Notes: I use tty.printer, which is the printer port on my beige G3. Obviously, use tty.modem if you connect your old terminal to the modem port. I don't know the appropriate device for a USB-RS232 interface. If someone try this, please post the info here. Also, your old terminal should be set at 9600 baud. If you use 19200 baud instead, use serial.19200.

Final step: next time you reboot with your old terminal properly connected and configured for VT100 mode and 9600 baud, you should get a login prompt on it. Enter your login and password, and you're now able to run any command you like!

    •    
  • Currently 2.33 / 5
  You rated: 1 / 5 (6 votes cast)
 
[40,222 views]  

Use an old serial VT100 terminal with OS X | 14 comments | Create New Account
Click here to return to the 'Use an old serial VT100 terminal with OS X' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use an old serial VT100 terminal with OS X
Authored by: brettcar on Jul 25, '03 01:35:08PM

This is great! I've been wanting to do this for a while. Now I just need to find a terminal...



[ Reply to This | # ]
Only one with a serial port?
Authored by: sgi_oh_too on Jul 25, '03 02:37:01PM

The xServe has a serial port, also griffin makes something called a cubePort which replaces the modem in a G4 Cube with a serial port ... also ... you may be able to use a keyspan usb-serial adapter if you are up for more playtime



[ Reply to This | # ]
Use an old serial VT100 terminal with OS X
Authored by: _merlin on Jul 25, '03 10:12:35PM

The exact name of the device for USB-serial interfaces varies depending on the exact device. For my MCT U232-P9, it's "tty.USB Serial". Yes, there is a space in it.



[ Reply to This | # ]
Use an old serial VT100 terminal with OS X
Authored by: nevyn on Jul 26, '03 08:53:38AM

Oh, I've always wanted to do that! Anyone knows where one could get ones hands on one online? I don't live anywhere near a place that could have one...



[ Reply to This | # ]
Use an old serial VT100 terminal with OS X
Authored by: babbage on Jul 26, '03 04:32:49PM
Have you considered eBay? They should be cheap...

---
--

DO NOT LEAVE IT IS NOT REAL


[ Reply to This | # ]

Use an old serial VT100 terminal with OS X
Authored by: blaznee on Jul 26, '03 05:31:21PM

I've been using a VT320 and VT340 over a Keyspan Twin Serial adapter for about a year now. The /etc/ttys entries go like this:

tty.USA28X13P1.1 "/usr/libexec/getty local.9600" vt100 on local secure
tty.USA28X13P2.2 "/usr/libexec/getty local.9600" vt100 on local secure

It was great fun figuring this out. O'Reilly's _Essential System Administration_ was most helpful. Strange thing, though -- every once in a while getty goes berserk chewing up memory until it punches out and restarts. Weird. The process servicing the VT320 seems especially prone to this.



[ Reply to This | # ]
Probably don't need to reboot
Authored by: simonlok on Jul 27, '03 12:26:00AM

On other unices, a command like "telinit -q" will cause the getty's to respawn and the new settings in /etc/ttys to take effect.



[ Reply to This | # ]
Probably don't need to reboot
Authored by: zigong on Jul 27, '03 10:36:20AM
That's true for GNU/linux, but not for BSD family. From "init" man page (init is the "mother of all processes", which in particular read the tty file to start getty on turned on lines):
Line status (on, off, secure, getty, or window information) may be
changed in the ttys file without a reboot by sending the signal SIGHUP to
init with the command ``kill -s HUP 1''.
but according to the man page, you still need to logout and back in for init to actually process changes.

[ Reply to This | # ]
Use an old serial VT100 terminal with OS X
Authored by: sporadic on Feb 08, '04 02:40:56PM

Interestingly you could run the terminal remotely via one of these:
http://www.free2move.se/prod_spp.htm

Bluetooth rocks.
I haven't tried it yet but I was thinking of stuffing that on a weasel so I can admin my NetBSD server from my powerbook even when it is in single user mode.



[ Reply to This | # ]
Use an old serial VT100 terminal with OS X
Authored by: mcordero on Jan 29, '05 06:03:13PM

When I try to access certain external legacy devices (CSUs etc.) via Internet Connect (Terminal window in VT100/ASCII mode; Keyspan USB/serial adapter) I get characters like this [01;78H44[08;16H[01;78H45 instead of the ASCII characters I get with an older Mac using a 3rd-party emulator like Microphone Pro. Any idea how to fix this?



[ Reply to This | # ]
Use an old serial VT100 terminal with OS X
Authored by: wdunnahoo on Mar 10, '08 10:57:33PM

This was working for me using a KeySpan USA-19HS on Tiger using

tty.KeySerial1 "/usr/libexec/getty serial.9600" vt100 on secure

in the /etc/ttys file. I've upgraded to Leopard and this no longer works. I no longer get a login prompt on the terminal. I verified the serial line works by "cp"ing to and from the terminal. I really need this because I work on several OpenVMS systems that require full VT100 functionality (actually a VT525 with a LK411 keyboard) through ssh. As I'm not entirely up to speed on UNIX so the man pages haven't provided any help for me.

Thanks for any help,

Wesley



[ Reply to This | # ]
Use an old serial VT100 terminal with OS X
Authored by: Hugh Hood on Oct 24, '10 05:37:47PM
Wesley,

I realize it's been a couple of years since your comment, but ...

I suspect, but have yet to confirm, that the serial terminal support described in this hint can be re-enabled in Leopard and beyond by adding back the required entries in the /etc/gettytab and /etc/ttys files.

You may want to reference footnote #s 8 and 10 in the article I wrote for A2Central.com on Apple II to Mac Intelligent Serial Terminal File Transfers. The article is here [link: OS X Serial Terminal] and includes more information than you probably care to learn, but it details the specific entry in the gettytab file to get everything working, as well as adding a few bonuses not covered in the original hint, including transparent zmodem transfers and 57,600 baud operation. I've since moved up to 115,200 baud, and that's with an Apple II as the terminal.

When I had access to a friend's Leopard Mac to examine the ttys and gettytab files with a text editor, I found the gettytab file table had been gutted and it seemed like the ttys file was a little 'skinnier' too. My friend had no interest in serial terminal support so I didn't get to experiment -- can't say I blame him.

It would be nice if someone could see if my suspicion was correct.

Hugh



[ Reply to This | # ]

Use an old serial VT100 terminal with OS X
Authored by: Hugh Hood on Jul 10, '11 11:10:32AM
Good News --

Thanks to the efforts of a guy posting on the Carnegie Mellon University Computer Club web site, it appears that the mystery of how to enable the type of serial terminal support described in this hint post Tiger (OS X 10.4+) has been solved.

Rather than modifying the '/etc/ttys' file to start and run getty for the desired serial device, you simply construct a short Property List file (.plist) that starts the getty. This file is then placed in the '/Library/LaunchDaemons' directory.

He provides an example of such a .plist that can be easily modified to accommodate both your particular '/etc/gettytab' entry as well as your particular serial device, just as was done previously with the enabling line in the '/etc/ttys' file.

I won't copy his example .plist here. See the full article:

Serial Console in Mac OS X

He also discusses a method of automatic login, which wasn't mentioned previously in this Hint, but which may appeal to some.

Should you need further detail on selecting/constructing a proper 'gettytab' entry for your application, I would refer you to the article I mentioned in the previous post, as well as an examination of the '/etc/gettytab' file itself.

Hugh



[ Reply to This | # ]
Use an old serial VT100 terminal with OS X
Authored by: roach on Jan 18, '12 03:20:25PM

That guide looks very promising, but I cannot get it to work un 10.5 Server or 10.7 Client/Server. Anyone gotten it working?



[ Reply to This | # ]